<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- 当点击浏览器返回时强制刷新，重新读取数据 -->
<!-- <META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="0">
 -->

<title>我的购物车</title>
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath() %>/resources/css/cartlist.css">
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath() %>/resources/css/common/jquery-ui-1.10.4.custom.css">
<script type="text/javascript"
	src="<%=request.getContextPath() %>/resources/js/common/jquery-1.10.2.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath() %>/resources/js/common/jquery-ui-1.10.4.custom.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath() %>/resources/js/cartlist.js"></script>
</head>
<body>


	<%@include file="common/header.jsp"%>

	<p class="toindex">
		<a href="<%=request.getContextPath() %>/index">首页&nbsp;>></a>&nbsp;我的购物车
	</p>
	<div id="center">

		<table id="table" cellspacing="0">
			<thead>
				<tr>
					<td><input type="checkbox" id="btnCheckAll" class="chk">全选</td>
					<td>商品信息</td>
					<td>单价</td>
					<td>预定日期</td>
					<td>数量</td>
					<td>合计</td>
					<td>操作</td>
				</tr>
			</thead>
			<tbody>
				<c:forEach var="proincart" items="${cartlist }">
					<tr>
						<td><input type="checkbox" name="chkItem" class="chk"></td>
						<td class="img_infor"><img
							src="${proincart.pro_pic }">
							<p>${proincart.description }</p></td>
						<td>¥&nbsp;<span class="pro_price">${proincart.pro_price }</span></td>
						<td>${proincart.date }</td>
						<td><p class="count">
								<input class="min" type="button" value="-" onclick="tomin(this)">
								<input class="countval" type="text"
									value="${proincart.quantity }" name="quantity"> <input
									class="add" type="button" value="+" onclick="toadd(this)">
							</p></td>
						<td id="pro_totalprice">¥&nbsp;<strong class="total_price">${proincart.pro_totalprice }</strong></td>
						<td><input class="remove_bt" type="button" value="删除"
							onclick="remove(this)"> <input class="pro_id" type="text"
							value="${proincart.product_id }" style="display: none"></td>
					</tr>
					<tr>
						<td></td>
					</tr>
				</c:forEach>
				<tr>
					<td><input type="checkbox" id="btnCheckNone" class="chk">全不选</td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
				</tr>
			</tbody>
		</table>
		<div class="page">
			<a class="pagetext">共&nbsp;${page.total }&nbsp;个宝贝&nbsp;共&nbsp;${page.pages }&nbsp;页&nbsp;&nbsp;当前第&nbsp;${page.pageNum }&nbsp;页</a>
			<a href="<%=request.getContextPath() %>/user/cartlist?page=${page.firstPage }"><input
				type="button" value="首页" class="btn"></a> <a
				href="<%=request.getContextPath() %>/user/cartlist?page=${page.prePage }"><input
				type="button" value="上一页" class="btn"></a><a
				href="<%=request.getContextPath() %>/user/cartlist?page=${page.nextPage }"><input
				type="button" value="下一页" class="btn"></a> <a
				href="<%=request.getContextPath() %>/user/cartlist?page=${page.lastPage }"><input
				type="button" value="尾页" class="btn"></a>
		</div>
		<div class="fgp"><span class="price">总价：¥&nbsp;<strong class="cart_totalprice"
			id="sum">0.0</strong></span> <input type="button" class="figure" value="去结算"
			name="figure"></div>
		<!-- 这是数据提交部分，选中的商品信息 -->
		<form action="<%=request.getContextPath() %>/user/figure" id="fig_form" method="post"
			style="display: none">
			<input type="text" name="arr_proid"> <input type="text"
				name="arr_quantity">
		</form>

	</div>
	<%@include file="common/footer.jsp"%>



</body>
</html>